<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String ctx = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + ctx + "/";
%>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>支付</title>
    <link rel="stylesheet" href="/css/pay.css">
</head>

<body>
<div class="all">
    <header>
        <jsp:include page="topbar.jsp"/>
    </header>
    <div class="comment">
        <div class="cssNav">
            <li>下单</li>
            <li>支付</li>
            <li>交易成功</li>
        </div>
        <div class="comment-det">
            <img src="${byId.goodsImg}" alt="">
            <h2>${byId.goodsName}</h2>
            <p>${byId.goodsPrice}元</p>
        </div>
    </div>
    <div class="address">
        <h2>收货信息</h2>
        <div class="add">
            <p style="flex: 4;">收货地址:${userAccount.userAddress}</p>
        </div>
    </div>
    <div class="dingdan">
        <div class="dingdan-det">
            <p>商品总价：${byId.goodsPrice}元</p>
        </div>
        <div class="btn">
            <form action="<%=ctx%>/Order/addOrder?goodsId=${byId.goodsId}" method="post">
                <button type="submit">提交订单</button>
            </form>
        </div>
    </div>
</div>

</body>
<style>
    .add {
        margin: 20px 30px;
        display: flex;
    }

    .add .btn {
        flex: 1;
        margin: auto;
    }

    .add > button, .btn > button {
        width: 109px;
        height: 40px;
        border: 1px solid beige;
    }

    .dingdan {
        display: flex;
    }

    .dingdan .dingdan-det {
        flex: 3;
        margin: 0 30px;
    }

    .dingdan .btn {
        flex: 1;
        margin: auto;
    }
</style>

</html>